package com.wc.AlgoOJ_train.train1.c7.A712;

import java.util.Scanner;

/**
 * @Author congge
 * @Date 2024/1/11 12:45
 * @description Fibbonacci Number
 * http://43.138.190.70:8888/p/A712
 */
public class Main {
    public static void main(String[] args) {
        int maxN = 50 + 7;
        long[] dp = new long[maxN];
        dp[1] = 1;
        for (int i = 2; i < maxN; i++) {
            dp[i] = dp[i - 1] + dp[i - 2];
        }
        Scanner sc = new Scanner(System.in);
        while (sc.hasNextInt()) {
            int n = sc.nextInt();
            if (n == -1) {
                return;
            }
            System.out.println(dp[n]);
        }
    }
}
